package xyz.zdsoft.course_manage_module.bo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;
import xyz.zdsoft.course_manage_module.pojo.MyPage;

import javax.validation.constraints.Past;
import java.io.Serializable;
import java.util.Date;

/**
 * @author 王林
 * @version 1.0
 * @date 2021-07-22 周四
 * @time 12:56
 * @description
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(value = "条件查询课程类")
public class CourseInfoBo extends MyPage implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "学生id", required = false)
    private Integer studentId;

    @ApiModelProperty(value = "教师id", required = false)
    private Integer TeacherId;

    @ApiModelProperty(value = "课程名称", required = false)
    private String courseName;

    @ApiModelProperty(value = "责任老师姓名", required = false)
    private String dutyTeacher;

    @ApiModelProperty(value = "实训老师姓名", required = false)
    private String trainTeacher;

    //    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd" , timezone = "GMT+8")
    @Past(message = "必须为一个过去的时间")
    @ApiModelProperty(value = "查询开始日期", required = false)
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date startDate;

    @Past(message = "必须为一个过去的时间")
    @ApiModelProperty(value = "查询结束日期", required = false)
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date endDate;


}

